<li id="storageB" style="display: list-item;position: relative;">
    <label>调入仓库:</label>
    <span class="ui-combo-wrap " id="storageBSpan" style="width: 255px;">
        <input type="text" class="input-txt" autocomplete="off" id="storeInName" readonly="readonly" style="cursor: default; width: 225px;">
        <span class="trigger" id="storageBTrigger"></span>
    </span>

    <div class="ui-droplist-wrap" id="storageBBox" style="position: absolute; z-index: 1000; width: 255px; display: none;left: 78px;top: calc(100% + 2px); ">
        <div class="droplist" style="position: relative; overflow: auto; min-height: 150px; height: 150px;">
            <div class="list-item selected" data-value="0" title="空">空</div>
            {volist name="store" id="store_vo"}
                <div class="list-item" data-value="{$store_vo.id}" title="{$store_vo.name}">{$store_vo.name}</div>
            {/volist}
        </div>
    </div>

</li>

<input type="hidden" id="storeInId" value="">


<script type="text/javascript">
	$(document).ready(function () {

		// 点击选择调入仓库
		$("#storageBSpan").click(function(){
			$("#storageBBox").toggle();
		});
		// 调入仓库赋值
		$("#storageBBox .list-item").click(function(){
			$("#storeInName").val($(this).attr("title"));
			$("#storeInId").val($(this).attr("data-value"));
			$(this).addClass("selected").siblings().removeClass("selected");
			$("#storageBBox").hide();
		});
	});

	//选择调入仓库-选择框外点击则隐藏
    $(document).mouseup(function (e) {
      if(e.target.id!="storeInName" && e.target.id!="storageBTrigger"){
            var con = $("#storageBBox");   // 设置目标区域
            if (!con.is(e.target) && con.has(e.target).length === 0) {
              $("#storageBBox").hide();
            }
        } 
    });
</script>